package com.czkt.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.czkt.entity.CstService;
import com.czkt.entity.vo.CstServiceAndBasDict;
import com.czkt.mapper.CstServiceMapper;
import com.czkt.service.ICstServiceService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jobob
 * @since 2024-06-18
 */
@Service
public class CstServiceServiceImpl extends ServiceImpl<CstServiceMapper, CstService> implements ICstServiceService {

    @Resource
    CstServiceMapper cstServiceMapper;

    @Override
    public IPage<CstService> selectService(String svrCustName, String svrDueTo, String svrTitle, Integer pageIndex, Integer pageSize) {
        Page<CstService> servicePage = new Page<>(pageIndex,pageSize);
        return cstServiceMapper.selectService(servicePage,svrCustName,svrDueTo,svrTitle);
    }

    @Override
    public IPage<CstService> selectServiceAndBasDict(String svrCustName, String svrType, String svrTitle, Integer pageIndex, Integer pageSize) {
        Page<CstService> servicePage = new Page<>(pageIndex,pageSize);
        return cstServiceMapper.selectServiceAndBasDict(servicePage,svrCustName,svrType,svrTitle);
    }

    @Override
    public IPage<CstServiceAndBasDict> selectServiceAndArch(String svrCustName, String svrType, String svrTitle, Integer pageIndex, Integer pageSize) {
        Page<CstServiceAndBasDict> servicePage = new Page<>(pageIndex,pageSize);
        return cstServiceMapper.selectServiceAndArch(servicePage,svrCustName,svrType,svrTitle);
    }

    @Override
    public IPage<CstService> selectServiceAndFeedback(String svrCustName, String svrType, String svrTitle, Integer pageIndex, Integer pageSize) {
        Page<CstService> servicePage = new Page<>(pageIndex,pageSize);
        return cstServiceMapper.selectServiceAndFeedback(servicePage,svrCustName,svrType,svrTitle);
    }

    @Override
    public IPage<CstService> selectServiceDeal(String svrCustName, String svrType, String svrTitle, Integer pageIndex, Integer pageSize) {
        Page<CstService> servicePage = new Page<>(pageIndex,pageSize);
        return cstServiceMapper.selectServiceDeal(servicePage,svrCustName,svrType,svrTitle);
    }
}
